package com.mwx.baselib.utils;

import android.text.TextUtils;

public class Utils {
    /**
     * 判断图片添加域名
     */
    public static String UrlHttp(String s) {
        if (!TextUtils.isEmpty(s)) {
            if (!s.startsWith("http") && s.startsWith("app_store")) {
                s = "https://img.minweixian.cn/store/" + s;
            } else if (!s.startsWith("http") && s.startsWith("logo")) {
                s = "https://img.minweixian.cn/store/" + s;
            } else if (!s.startsWith("http") && s.startsWith("dpgg")) {
                s = "https://img.minweixian.cn/store/" + s;
            } else if (!s.startsWith("http") && s.startsWith("store")) {
                s = "https://img.minweixian.cn/" + s;
            } else if (!s.startsWith("http") && s.startsWith("app")) {
                s = "https://img.minweixian.cn/store/" + s;
            } else if (!s.startsWith("http") && s.startsWith("takeout")) {
                s = "https://img.minweixian.cn/store/" + s;
            } else if (!s.startsWith("http") && s.startsWith("image")) {
                s = "https://img.minweixian.cn/store/" + s;
            } else if (!s.startsWith("http") && !TextUtils.isEmpty(s)) {
                s = "https:" + s;
            }
        }
        return s;
    }
}
